package cn.oatn;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;

public class T1005_ASM_Copy {

    public static void test() throws IOException {
        ClassReader cr = new ClassReader("cn.oatn.MyRunnable");
        ClassWriter cw = new ClassWriter(0);
        cr.accept(cw, 0);

        OutputStream o = new FileOutputStream("XXX.class");
        o.write(cw.toByteArray());
        o.close();

    }
}
